package com.zyh.number;

public class NumberDemo4 {
    public static void main(String[] args) {
        String bNum = Integer.toBinaryString(9);
        System.out.println("bNum = " + bNum);
        String oNum = Integer.toOctalString(9);
        System.out.println("oNum = " + oNum);
        String hNum = Integer.toHexString(15);
        System.out.println("hNum = " + hNum);
        int num1 = Integer.parseInt("1000", 2);
        System.out.println("num1 = " + num1);
        int num2 = Integer.parseInt("77", 8);
        System.out.println("num2 = " + num2);
        int num3 = Integer.parseInt("29c", 16);
        System.out.println("num3 = " + num3);

    }
}
